<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>可选链与空值合并运算符</title>
</head>
<body>
    <script>
        let value = null??0;
        console.log(value);


        let obj = {
            name:"cq",
            running:function()
            {
                console.log("跑");
            }
        }

        console.log(obj?.name);
        obj.running = null;
        obj?.running?.running();
    </script>
</body>
</html>